	<style type="text/css">
       .main{
		   /*width:80%;*/
		   height:auto;
		    margin: 0 auto;
		   }
		.span12 p{
			border: #DCDCDC solid none;
			color:#666;
			padding:10px;
			font-size: 15px;
            margin-top: 20px;
            text-align: center;
	    }
		.span6 h3{
			color:#8DBD4C; 
			padding:3px; 
			text-align:left; 
			size: 12px;
			}
		..span6 p{
			size:12px;
			text-align:left; 
			padding: 0 5px 5px 5px; 
			color:#666; 
			text-height: 60px;
			}
		#span6_left{
			border:solid 1px #DCDCDC; padding: 0 20px 10px 20px; }
		#span6_right{
			border:solid 1px #DCDCDC; padding: 0 20px 10px 20px; }
		.star{
			color:red;
		}
			
	</style>  
	<?php 
		require_once('libraryfiles/dbconfig.php');
		require_once 'libraryfiles/db-funct.php';
		require_once 'libraryfiles/SendEmail.php';
		if(isset($_POST['btnSentContact'])){
			$Name = trim($_POST['name']);
			$Email = trim($_POST['email']);
			$Subject = trim($_POST['subject']);
			$Message = trim($_POST['message']);
			if(empty($Name) || empty($Email) || empty($Subject) || empty($Message)){
				header("location:".base_url."contact.php?message=required");
				exit();
			}
			if(!filter_var($Email, FILTER_VALIDATE_EMAIL)){
				header("location:".base_url."contact.php?message=invalidemail");
				exit();
			}
			
			if(!empty($Email)){
					$sql = "SELECT *FROM tbl_refcode WHERE ref_name = 'mail_user_login'";
					$mailsetting = mysql_query($sql);
					$mail = $Email;
					$Name =  $Name;
					$base = '';
					$name = $Name;
					$email = mysql_fetch_array($mailsetting);
					$header = mysql_fetch_array($mailsetting);
					$subjects = $Subject;
					$BodyHeader =$Subject;
					$BodyMessage = $Message;
					$transport = new SendEmail();
					$transport = $transport->SendMail($name, $email, $base=0, $header, $subjects, $BodyHeader, $BodyMessage);
					header("location:".base_url."contact.php?message=sendmail");
					exit();
			
				}
			}
		
	?>
  <div class="main">
    <div class="row">
      <div class="box laster custom">
        <div class="box-heading">
			<h2>INFORMATION</h2>
		</div>
		<div class="row-fluid" style="background-color:#FFF;text-align:center;border-bottom:1px solid #8DBD4C;padding:5px 0px 5px 0;font-size:14px;">
    		   <p><strong>Psarinternet answers your questions and advises you.<br/>
Do not hesitate to contact us for any inquiry regarding our services or our products using the form below.</strong> 
               </p>
        </div>
    	<div class="span12">
    		<div class="row">
              <div class="row-fluid">
    			<div class="span6" id="span6_left" style="background-color:white;">
                   <!-- Contact us from-->
                   <br/>
                   <?php 
                   	if(isset($_GET['message'])){
                   		if($_GET['message']=="required"){
                   ?>
                   		<div class="warning">Fields are required!</div>
                   <?php 
                   		}
                   	}
                   ?>
                   <?php 
                   	if(isset($_GET['message'])){
                   		if($_GET['message']=="invalidemail"){
                   ?>
                   		<div class="warning">Your email that you provide is Invalid formate!</div>
                   <?php 
                   		}
                   	}
                   ?>
                   <?php 
                   	if(isset($_GET['message'])){
                   		if($_GET['message']=="sendmail"){
                   ?>
                   		<div class="success">Your email has been sent!</div>
                   <?php 
                   		}
                   	}
                   ?>
                   
                   <form class="contact-us form-horizontal" method="post" action="<?php echo base_url; ?>contact.php">
		             <h3 style="color:#8DBD4C; text-align:center; size: 12px;">* Contact Us</h3>
		                <div class="control-group">
	                          <label class="control-label">Name<b class="star">*</b></label>
			                  <div class="controls">
			                  <div class="input-prepend">
				                <span class="add-on"><i class="icon-user"></i></span>
					            <input type="text"  class="input-xlarge" name="name" placeholder="Name">
				              </div>
			                  </div>
		                 </div>
		                 <div class="control-group">
	                         <label class="control-label">Email<b class="star">*</b></label>
			               <div class="controls">
			                <div class="input-prepend">
				             <span class="add-on"><i class="icon-envelope"></i></span>
					          <input type="text" class="input-xlarge" name="email" placeholder="Email">
				            </div>
			               </div>	
		                 </div>
		                 <div class="control-group">
	                         <label class="control-label">Subject<b class="star">*</b></label>
			              <div class="controls">
			              <div class="input-prepend">
				           <span class="add-on"><i class="icon-globe"></i></span>
					         <input type="text"  id="subject" class="input-xlarge" name="subject" placeholder="Suject">
				           </div>
			              </div>
		                 </div>
		                 <div class="control-group">
	                        <label class="control-label">Message<b class="star">*</b></label>
			             <div class="controls">
			             <div class="input-prepend">
				          <span class="add-on"><i class="icon-pencil"></i></span>
					         <textarea name="message" rows="4" cols="80" placeholder="Enter your message here"></textarea>
				         </div>
			            </div>
		              </div>
		              <div class="control-group">
		                <div class="controls">
			             <input type="submit" class="button pull-right" name="btnSentContact" value="<?php echo $lang['SAND'];?>"/>
			          
	                    </div>	
		              </div>
	               </form>

                  <div class="modal hide fade">
                    <div class="modal-body">
		               <p>Thank for contacting us.</p>
		               <p class="ajax_data"></p>
                    </div>
	              <div class="modal-footer">
		            <a href="#" class="btn btn-primary" id="done">Done</a>
		            <a href="#" class="btn" id="close">Close</a>
	              </div>
                 </div>
                 <!--End contact us-->
                </div>
                
    			<div class="span6" id="span6_right" style="background-color:white;">
                     <h3 style="color:#8DBD4C; text-align:center; size: 12px;">* PSARINTERNET.COM Map Location</h3>
                 <iframe width="100%" height="335" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps/ms?msa=0&amp;msid=211602664254857031629.0004fd74201e9118e3c9d&amp;hl=en&amp;ie=UTF8&amp;t=m&amp;ll=11.570861,104.919047&amp;spn=0.001556,0.002642&amp;output=embed"></iframe><br /><small>View <a href="https://maps.google.com/maps/ms?msa=0&amp;msid=211602664254857031629.0004fd74201e9118e3c9d&amp;hl=en&amp;ie=UTF8&amp;t=m&amp;ll=11.570861,104.919047&amp;spn=0.001556,0.002642&amp;source=embed" style="color:#0000FF;text-align:left">Psarinternet.com</a> in a larger map</small>
               </div>
               <div class="span12">&nbsp;</div>
              
                <div class="row-fluid">
					<div class="span6"><img  src="images/phsarinternet-contact-location.jpg" style="padding:10px; float:left;" width="85%"  height="70%"/></div>
					<div class="span6">
                    <br/>
                    <h3 style="color:#8DBD4C; padding:1=0px; text-align:left; size: 12px;">PSARINTERNET.COM</h3>
						<p style="size:12px;text-align:left; padding: 0 5px 0px 5px; color:#666; text-height: 60px;">
						<strong>អាសយដ្ឋាន​:</strong>ផ្ទះ​លេខ២ សេ  ផ្លូវ​លេខ១២០ សង្កាត់​ ផ្សា​ថ្មី​២  ខ័ណ្ឌ​ដូន​ពេញ រាជ​ធានី​ភ្នំពេញ​  ប្រទេស​កម្ពុជា​<br/><br/>
                        <strong>Address:</strong> #2C, Street 120, Sangkat Phsar Thmey II, Khan Daun Penh, Phnom Penh, Cambodia.<br/><br/>
						<strong>E-mail:</strong><a href="mailto:info@psarinternet.com">info@psarinternet.com</a><br/><br/>
						<strong>Tel:</strong> +855 70 772 799<br/><br/>
                    </div>
                    <div class="span12"></div>
				</div>
             </div>
    	   </div>
    	</div>
      </div>
    </div>
  </div>
    